const jwt = require('jsonwebtoken')

module.exports = (name) => {
    const secretKey = 'yxy_s_secret_key';
    return 'Bearer ' + jwt.sign({username: name}, secretKey, {
        expiresIn: '1d'
    })
}